<script>
    $.cookie('token', '$token', { expires: 7 });

    window.location.href = "index.cgi"

</script>